

project(NaturalEngineLib LANGUAGES C CXX VERSION 1.0.0)
find_package(Vulkan REQUIRED)

set(ENGINE_LIB "${PROJECT_NAME}" CACHE STRING "自然引擎静态库。")
file(GLOB_RECURSE SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
add_library(${PROJECT_NAME} STATIC ${SOURCES})
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/core"
        "${CMAKE_CURRENT_SOURCE_DIR}/src/utility"
        "${CMAKE_CURRENT_SOURCE_DIR}/src/vulkan")

target_include_directories(${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(LIBS "${LUA_LIB};spdlog;SDL2-static;Vulkan::Vulkan;sol2;")
target_link_libraries(${PROJECT_NAME} ${LIBS})

if (CMAKE_BUILD_TYPE STREQUAL "Debug")
    target_compile_definitions(${PROJECT_NAME} PRIVATE DEBUG)
endif ()